package com.ecmwidgets.test;

public abstract class RESTUtil {
	private static String packageName = RESTUtil.class.getPackage().getName();

	public static RESTUtil getJSONUtil()
			throws IllegalAccessException, InstantiationException,
			ClassNotFoundException {
		// Use reflect to initialize concrete RepresentationManager
		// instance
		String className = packageName + "." + "RESTUtilOnJSON";
		RESTUtil factory = (RESTUtil) Class.forName(className).newInstance();
		return factory;
	}

	public static RESTUtil getATOMUtil()
			throws IllegalAccessException, InstantiationException,
			ClassNotFoundException {
		// Use reflect to initialize concrete RepresentationManager
		// instance
		String className = packageName + "." + "RESTUtilOnATOM";
		RESTUtil factory = (RESTUtil) Class.forName(className).newInstance();
		return factory;
	}
}
